package com.example.anew.journey.mynewjourney.firstchangelogic.firstChangeDirectionsUse;

import android.util.DisplayMetrics;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.ScrollView;

import com.example.anew.journey.mynewjourney.R;
import com.example.anew.journey.mynewjourney.base.FirstChangeAllBaseActivity;

/**
 * 杭州惟君医疗科技有限公司15
 * Created by 20433 on 2018/3/23
 *
 * @desc 东风山河绿，春已不折柳，繁花看不尽，处处惹人留
 * @desc 佛祖镇楼，bug辟容易
 */

public class FirstChangeDirectionsUseActvity extends FirstChangeAllBaseActivity {

    private View view;
    private ImageView iv_big;
    private int identificationCode;
    private int[] arr = new int[]{R.drawable.preferred_method,R.drawable.pregnancy_tips};
    private ScrollView scroll_view;

    @Override
    protected View setMainContentView() {
        view = View.inflate(this, R.layout.activity_first_change_directions_use, null);
        iv_big = view.findViewById(R.id.activity_first_change_directions_use_iv_big);
        scroll_view = view.findViewById(R.id.activity_first_change_directions_use_scroll_view);
        return view;
    }

    @Override
    protected void initView(View view) {
        identificationCode = getIntent().getIntExtra("identification_code",0);
        displayToolbar();
        displayReturn();
        displayTvName();
        setToolbarBg(0xff2196F3);
        setReturnrePictuResources(R.mipmap.return_02);
        if(identificationCode == 0){  // 使用方式
            setTvNameEachAttribute(20,0xffffffff,"使用说明");
            iv_big.setBackgroundResource(arr[0]);
        }else if(identificationCode == 1){
            setTvNameEachAttribute(20,0xffffffff,"小贴士");
            iv_big.setBackgroundResource(arr[1]);
        }
        DisplayMetrics metrics = getResources().getDisplayMetrics();
       float app_density = metrics.density;
       int screen_width = metrics.widthPixels;
        int screen_height = metrics.heightPixels;

        int height =screen_width * 1096 / 640;
        iv_big.setLayoutParams(new FrameLayout.LayoutParams(screen_width,height));

    }

    @Override
    protected void releaseResources() {

    }

    @Override
    protected void promptHaveInternet() {

    }

    @Override
    protected void promptNoInternet() {

    }

    @Override
    protected void onClickShared() {

    }

    @Override
    protected void onClickRelease() {

    }

    @Override
    protected void onClickReturn() {
        finish();
    }

}
